<template>
    <div class="weather_box">
        <div id="he-plugin-standard"></div>
    </div>
</template>
<script>
export default {
    name:"MapWeather",
    mounted() {
        setTimeout(()=>{
            // this.getWeather();
        },2000)
    },
    methods:{
         //天气配置
        getWeather() {
            window.WIDGET = {
                CONFIG: {
                    layout: '2',
                    width: 230,
                    height: 230,
                    background: '1',
                    dataColor: 'FFFFFF',
                    borderRadius: '5',
                    key: '19eba4e63f2e43b3a2c74c8f0c6f7855'
                }
            };
            let script = document.createElement('script');
            script.type = 'text/javascript';
            script.src = 'https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0';
            document.getElementsByTagName('head')[0].appendChild(script);
        },
    }
}
</script>